package com.cykj.pos.service;

import com.cykj.pos.domain.BizMerchAddress;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cykj.pos.domain.dto.OrderDTO;
import com.cykj.pos.profit.dto.AddressDTO;
import com.cykj.pos.profit.dto.BizMerchAddressDTO;

import java.util.List;

/**
 * 伙伴地址Service接口
 *
 * @author weijianbo
 * @date 2021-04-28
 */
public interface IBizMerchAddressService extends IService<BizMerchAddress> {

    /**
     * 查询列表
     */
    List<BizMerchAddress> queryList(BizMerchAddress bizMerchAddress);

    /**
     * 根据Id修改编辑
     * @param bizMerchAddress
     * @return
     */
    BizMerchAddress updateByAddrId(BizMerchAddress bizMerchAddress);

    /**
     * 删除地址
     * @param bizMerchAddress
     */
    void delete(BizMerchAddress bizMerchAddress);

    /**
     * 根据id查一条
     * @param bizMerchAddress
     * @return
     */
    BizMerchAddress selectById(BizMerchAddress bizMerchAddress);

    /**
     * 根据userid查询地址列表
     * @param bizMerchAddress
     * @return
     */
    List<BizMerchAddress> List(BizMerchAddress bizMerchAddress);

    /**
     * 修改默认地址
     * @param bizMerchAddress
     */
    void updateDefaultAddr(BizMerchAddress bizMerchAddress);

    /**
     * 订单获得地址
     * @param userId
     * @return
     */
    BizMerchAddressDTO queryAddressListByOrder(Long userId);

    /**
     * 获得订单的地址
     * @param orderDTO
     * @return
     */
    AddressDTO getOrderAddress(OrderDTO orderDTO);
}
